Remove calls to gtk_widget_set_allocation
authorTimm Bäder <mail@baedert.org>
Fri, 5 May 2017 17:18:53 +0000 (19:18 +0200)
committerMatthias Clasen <mclasen@redhat.com>
Thu, 20 Jul 2017 01:27:12 +0000 (21:27 -0400)
gtk_widget_size_allocate_with_baselines does it automatically now.

13 files changed:
demos/gtk-demo/gtkfishbowl.c
gtk/gtkcalendar.c
gtk/gtkeventbox.c
gtk/gtkfixed.c
gtk/gtkinvisible.c
gtk/gtklayout.c
gtk/gtkmenu.c
gtk/gtkpathbar.c
gtk/gtkpopover.c
gtk/gtktextview.c
gtk/gtktoolitem.c
gtk/gtktreeview.c
gtk/gtkwindow.c

index fd7b2627dab5b2a71c3c867ec529d8e77b6dcf38..447610c3c7a049ca2d5239a246c77a0f28fddc55 100644 (file)
@@ -113,8 +113,6 @@ gtk_fishbowl_size_allocate (GtkWidget     *widget,
   GtkRequisition child_requisition;
   GList *children;
 
-  gtk_widget_set_allocation (widget, allocation);
-
   for (children = priv->children; children; children = children->next)
     {
       child = children->data;
@@ -130,6 +128,8 @@ gtk_fishbowl_size_allocate (GtkWidget     *widget,
 
       gtk_widget_size_allocate (child->widget, &child_allocation);
     }
+
+  gtk_widget_set_clip (widget, allocation);
 }
 
 static double
index d9baabd7a969e9961db920657038c8cc3a68799c..3ab37262064a46a273a2899a2d2053275b14a8c1 100644 (file)
@@ -2060,7 +2060,6 @@ gtk_calendar_size_allocate (GtkWidget     *widget,
   gint calendar_xsep = calendar_get_xsep (calendar);
 
   get_component_paddings (calendar, &padding, NULL, NULL, NULL);
-  gtk_widget_set_allocation (widget, allocation);
 
   if (priv->display_flags & GTK_CALENDAR_SHOW_WEEK_NUMBERS)
     {
index f739bb727a4d0ca004692fad5362ef4127e2c4cf..87a670ab2635f949d9bc8bc314bf89259110a901 100644 (file)
@@ -466,8 +466,6 @@ gtk_event_box_size_allocate (GtkWidget     *widget,
 
   bin = GTK_BIN (widget);
 
-  gtk_widget_set_allocation (widget, allocation);
-
   if (!gtk_widget_get_has_window (widget))
     {
       child_allocation.x = allocation->x;
index 291567621f227375a8408cd47f3bb340b5bc8dd6..7cea586da669c7d99219c83055c14a68085a1738 100644 (file)
@@ -419,8 +419,6 @@ gtk_fixed_size_allocate (GtkWidget     *widget,
   GtkRequisition child_requisition;
   GList *children;
 
-  gtk_widget_set_allocation (widget, allocation);
-
   if (gtk_widget_get_has_window (widget))
     {
       if (gtk_widget_get_realized (widget))
index 16f5ef695e83323870c2b32c33452dbbe36b72c7..9478977d4f4772026a4ad73b5885b877425c8ad5 100644 (file)
@@ -255,7 +255,7 @@ static void
 gtk_invisible_size_allocate (GtkWidget     *widget,
                              GtkAllocation *allocation)
 {
-  gtk_widget_set_allocation (widget, allocation);
+  gtk_widget_set_clip (widget, allocation);
 }
 
 
index 8680763afbe407d3008ea27ff26fb9d92171bc45..040e542eb73136ce0fab7e12c85d9513deb98d42 100644 (file)
@@ -857,8 +857,6 @@ gtk_layout_size_allocate (GtkWidget     *widget,
   GtkLayoutPrivate *priv = layout->priv;
   GList *tmp_list;
 
-  gtk_widget_set_allocation (widget, allocation);
-
   tmp_list = priv->children;
 
   while (tmp_list)
index d3846326185053f95b5d6a92d9691d4e36217a2e..1aa1c75516d2a59dc32b43d2f8222e5ffad8f5f6 100644 (file)
@@ -2806,8 +2806,6 @@ gtk_menu_size_allocate (GtkWidget     *widget,
   menu_shell = GTK_MENU_SHELL (widget);
   priv = menu->priv;
 
-  gtk_widget_set_allocation (widget, allocation);
-
   get_menu_padding (widget, &padding);
 
   g_free (priv->heights);
index d4b0d09512477ce6af5c7997ac36421e4866c8e0..dd90ee19b425b2818ad8a24f5fecb73ac8c02db8 100644 (file)
@@ -464,8 +464,6 @@ gtk_path_bar_size_allocate (GtkWidget     *widget,
   gint down_slider_offset = 0;
   GtkRequisition child_requisition;
 
-  gtk_widget_set_allocation (widget, allocation);
-
   /* No path is set; we don't have to allocate anything. */
   if (path_bar->priv->button_list == NULL)
     {
index 44a0515625dda31941f8c7afe03b21f153913ae4..45707f1abaf6e4371bb327508078c08233d42338 100644 (file)
@@ -1354,7 +1354,6 @@ gtk_popover_size_allocate (GtkWidget     *widget,
   GtkAllocation child_clip;
   GtkAllocation clip = *allocation;
 
-  gtk_widget_set_allocation (widget, allocation);
   child = gtk_bin_get_child (GTK_BIN (widget));
   if (child)
     {
index 82a70a3f8d5651b72ebb994b4615cf8db06c3863..d9cc32dbd68e38cb75669dd0118c6a4c5202cb99 100644 (file)
@@ -4207,8 +4207,6 @@ gtk_text_view_size_allocate (GtkWidget *widget,
     widget_allocation.width != allocation->width ||
     widget_allocation.height != allocation->height;
 
-  gtk_widget_set_allocation (widget, allocation);
-
   /* distribute width/height among child windows. Ensure all
    * windows get at least a 1x1 allocation.
    */
index 2365af8fc0a7253d356bd31b2b5ec42b494be48e..eb1214993b54f66c0eba7112674e570f7b0b667e 100644 (file)
@@ -312,8 +312,6 @@ gtk_tool_item_size_allocate (GtkWidget     *widget,
   GtkAllocation child_allocation;
   GtkWidget *child;
 
-  gtk_widget_set_allocation (widget, allocation);
-
   child = gtk_bin_get_child (GTK_BIN (widget));
   if (child && gtk_widget_get_visible (child))
     {
index a8a500ff8119e9a562ecbbdd94d70051aedf4023..b9af41bd746c3fa7213da84676a7337771f0b14d 100644 (file)
@@ -2610,8 +2610,6 @@ gtk_tree_view_size_allocate (GtkWidget     *widget,
   if (allocation->width != old_width)
     width_changed = TRUE;
 
-  gtk_widget_set_allocation (widget, allocation);
-
   /* We size-allocate the columns first because the width of the
    * tree view (used in updating the adjustments below) might change.
    */
index 135f1c86ad41f8a036a051e964863565fe96fde5..9f6152869924c513df6f29fd3a464fdb3d5240ab 100644 (file)
@@ -7112,8 +7112,6 @@ _gtk_window_set_allocation (GtkWindow           *window,
   g_assert (allocation != NULL);
   g_assert (allocation_out != NULL);
 
-  gtk_widget_set_allocation (widget, allocation);
-
   child_allocation.x = 0;
   child_allocation.y = 0;
   child_allocation.width = allocation->width;